<template>
  <div class="cart-list">
    <cart-item v-for="(item, index) in cartList" :key="index" :cartItem="item" />
  </div>
</template>

<script>
  import CartItem from './CartItem.vue'
  import { mapState } from 'vuex'

  export default {
    name: 'cart-list',
    components: { CartItem },
    computed: {
      ...mapState(['cartList'])
    }
  }
</script>

<style lang="less" scoped></style>
